#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2014-2023, Intel Corporation
#
#
# pmempool_dump/TEST0 -- test for dump command
#

. ../unittest/unittest.sh

require_test_type medium

require_fs_type pmem non-pmem

setup

POOL=$DIR/file.pool
LOG=out${UNITTEST_NUM}.log
ERR=err${UNITTEST_NUM}.log
rm -f $LOG && touch $LOG

expect_normal_exit $PMEMPOOL$EXESUFFIX create obj $POOL
expect_normal_exit $PMEMWRITE$EXESUFFIX $POOL TEST
expect_abnormal_exit $PMEMPOOL$EXESUFFIX dump -b -o $LOG $POOL 2> $ERR
expect_abnormal_exit $PMEMPOOL$EXESUFFIX dump -b $POOL >> $LOG 2> $ERR
expect_abnormal_exit $PMEMPOOL$EXESUFFIX dump $POOL >> $LOG 2> $ERR

check

pass
